<div id = "chooseSingleResourceModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="chooseResourceStoreModelLabel" aria-hidden="true" >
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-body">
                <h3 class="m-t-none m-b "><span><vc:i18n name="选择物品" namespace="chooseSingleResource"></vc:i18n></span></h3>
                <div class="ibox-content">
                    <div>
                        <div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="商品类型" namespace="chooseSingleResource"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <select class="custom-select" v-model="chooseSingleResourceInfo.rsId"
                                        v-on:change="_listSonResourceStoreType()">
                                        <option selected value="">{{vc.i18n('请选择商品类型','chooseSingleResource')}}</option>
                                        <option v-for="(item,index) in chooseSingleResourceInfo.resourceStoreTypes" :key="index"
                                            :value="item.rstId">{{item.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div v-if="chooseSingleResourceInfo.isCustom">
                                <div class="form-group row">
                                    <label class="col-sm-2 col-form-label"><span><vc:i18n name="商品名" namespace="chooseSingleResource"></vc:i18n></span></label>
                                    <div class="col-sm-10">
                                        <input :placeholder="vc.i18n('必填，请填写商品名','chooseSingleResource')" cols="15" class="form-control"
                                            v-model="chooseSingleResourceInfo.customGoodsName">
                                    </div>
                                </div>
                                <div class="form-group row" v-if="chooseSingleResourceInfo.maintenanceType == '1001'">
                                    <label class="col-sm-2 col-form-label"><span><vc:i18n name="自定义价格" namespace="chooseSingleResource"></vc:i18n></span></label>
                                    <div class="col-sm-10">
                                        <input placeholder='必填，请填写自定义价格' cols="15" class="form-control" v-model="chooseSingleResourceInfo.price">
                                    </div>
                                </div>
                            </div>
                            <div v-else>
                                <div class="form-group row">
                                    <label class="col-sm-2 col-form-label"><span><vc:i18n name="二级分类" namespace="chooseSingleResource"></vc:i18n></span></label>
                                    <div class="col-sm-10">
                                        <select id="goods" class="custom-select" v-model="chooseSingleResourceInfo.rstId"
                                                v-on:change="_choseGoods()">
                                            <option selected value="">{{vc.i18n('请选择二级类型','chooseSingleResource')}}</option>
                                            <option v-for="(item,index) in chooseSingleResourceInfo.sonResourceStoreTypes" :key="index"
                                                    :value="item.rstId">{{item.name}}
                                            </option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group row" v-if="chooseSingleResourceInfo.rstId != ''">
                                    <label class="col-sm-2 col-form-label"><span><vc:i18n name="商品" namespace="chooseSingleResource"></vc:i18n></span></label>
                                    <div class="col-sm-10">
                                        <select id="goodsPrice" class="custom-select" v-model="chooseSingleResourceInfo.resId"
                                            v-on:change="_chosePrice()">
                                            <option selected value="">{{vc.i18n('请选择商品','chooseSingleResource')}}</option>
                                            <option v-for="(item,index) in chooseSingleResourceInfo.resourceStores" :key="index" :value="item.resId">
                                                {{item.resName}}
                                            </option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div v-if="chooseSingleResourceInfo.resId != ''">
                                <div v-if="chooseSingleResourceInfo.maintenanceType == '1001'">
                                    <div class="form-group row"
                                        v-if="chooseSingleResourceInfo.outLowPrice == chooseSingleResourceInfo.outHighPrice">
                                        <label class="col-sm-2 col-form-label"><span><vc:i18n name="商品价格" namespace="chooseSingleResource"></vc:i18n></span></label>
                                        <div class="col-sm-10">
                                            <input :placeholder="vc.i18n('必填，请填写商品价格','chooseSingleResource')" cols="15" class="form-control"
                                                disabled="disabled" v-model="chooseSingleResourceInfo.price">
                                        </div>
                                    </div>
                                    <div class="form-group row"
                                        v-if="chooseSingleResourceInfo.outLowPrice != chooseSingleResourceInfo.outHighPrice">
                                        <label class="col-sm-2 col-form-label"><span><vc:i18n name="自定义价格" namespace="chooseSingleResource"></vc:i18n></span></label>
                                        <div class="col-sm-10">
                                            <input placeholder='必填，请填写自定义价格' cols="15" class="form-control"
                                                v-model="chooseSingleResourceInfo.price"><span><vc:i18n name="价格范围" namespace="chooseSingleResource"></vc:i18n></span>{{chooseSingleResourceInfo.outLowPrice}}-{{chooseSingleResourceInfo.outHighPrice}}
                                        </div>
                                    </div>
                                </div>
                                <div>
                                    <div class="form-group row">
                                        <label class="col-sm-2 col-form-label"><span><vc:i18n name="规格" namespace="chooseSingleResource"></vc:i18n></span></label>
                                        <div class="col-sm-10">
                                            <input cols="15" class="form-control" v-model="chooseSingleResourceInfo.selectedGoodsInfo.specName" disabled="disabled">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div v-if="chooseSingleResourceInfo.resId != '' || chooseSingleResourceInfo.isCustom">
                                <div class="form-group row">
                                    <label class="col-sm-2 col-form-label"><span><vc:i18n name="商品数量" namespace="chooseSingleResource"></vc:i18n></span></label>
                                    <div class="col-sm-10">
                                        <div class="input-group">
                                            <span class="input-group-btn">
                                                <button class="btn btn-primary" type="button"
                                                    v-on:click="_useNumDec()">-</button>
                                            </span>
                                            <input type="text" class="form-control" v-model="chooseSingleResourceInfo.useNumber">
                                            <span class="input-group-btn">
                                                <button class="btn btn-primary" type="button"
                                                    v-on:click="_useNumInc()">+</button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="ibox-content">
                                <button class="btn btn-primary float-right" type="button" v-on:click="_chooseSingleResource()">
                                    <i class="fa fa-check"></i>&nbsp;确定
                                </button>
                                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" v-on:click="_closeModel()">
                                    <i class="fa fa-close"></i>&nbsp;取消
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
